Numerical control system

ABSTRACT

A numerical control system 1 comprises a numerical control device 5 for generating a machine tool command signal and a robot command signal, and a robot control device 6 for controlling the operation of a robot 3 on the basis of the robot command signal. The numerical control device 5 includes a coordinate form information management unit 524 for managing coordinate information according to a designated coordinate format that is based on a numerical control program, and a robot command signal generation unit 525 for generating the robot command signal on the basis of said coordinate information and a robot numerical control program. The robot control device 6 acquires a coordinate value on each axis of control in the designated coordinate format when the designated coordinate format is configured or changed, and transmits the same to the numerical control device 5 The coordinate form information management unit 524 updates said coordinate information using the coordinate value transmitted from the robot control device 6.

TECHNICAL FIELD

The present disclosure relates to a numerical control system.

BACKGROUND ART

Generally, a numerical control program for controlling a machine tool and a robot program for controlling a robot are written in different programming languages. For this reason, an operator needs to familiarize himself/herself with both the numerical control program and the robot program in order to be able to operate a machine tool and a robot in parallel.

Patent Document 1 discloses a numerical control device that controls both a machine tool and a robot by a numerical control program. The numerical control device of Patent Document 1 allows an operator familiar with the numerical control program to control a robot without having to familiarize himself/herself with the robot program.

-   Patent Document 1: Japanese Patent No. 6647472

DISCLOSURE OF THE INVENTION Problems to be Solved by the Invention

Meanwhile, a position and a posture of a typical six-axis articulated robot are represented in, for example, a joint coordinate format the components of which are rotational angle values (J1, J2, J3, J4, J5, J6) of the six joints, and a rectangular coordinate format the components of which are coordinate values (X, Y, Z) along three orthogonal coordinate axes and rotational angle values (A, B, C) around the respective orthogonal coordinate axes. Therefore, in the case of using a conventional robot control device, it is necessary to manage not only the six control axes of the joint coordinate format but also the six control axes of the rectangular coordinate format, that is, the coordinate values of the twelve control axes in total.

On the other hand, the number of control axes of a typical machine tool is at most about three to five, which is less than that of a robot. For this reason, when one of the systems of a numerical control device for controlling a machine tool is allocated as a robot control system as in the technique of Patent Document 1, it is necessary to increase the number of control axes to be managed over the number of machine tool control systems, which may result in high costs. Further, an increase in the number of control axes to be managed in a robot control system will increase the computational load of the robot control system, which may result in deterioration of machining performance of the robot and the machine tool. In addition, since the number of control axes that can be managed by the numerical control device is limited to a certain value, there is a possibility that a function of controlling a robot cannot be added to the numerical control device.

The present disclosure has been achieved in view of the foregoing disadvantages, and provides a numerical control system capable of controlling a robot without an increase in the number of control axes to be managed by a numerical control device.

Means for Solving the Problems

One aspect of the present disclosure is directed to a numerical control system including: a numerical control device configured to generate a machine tool command signal as a command directed to a machine tool in accordance with a first numerical control program, and a robot command signal as a command directed to a robot in accordance with a second numerical control program; and a robot control device communicable with the numerical control device and configured to control operation of the robot based on the robot command signal. In the second numerical control program, a position and a posture of the robot is able to be specified in two or more coordinate formats having different control axes. The numerical control device includes a coordinate information management unit and a robot command signal generation unit, the coordinate information management unit being configured to manage coordinate information including, as components, coordinate values of control axes of a designated coordinate format that is designated in accordance with the second numerical control program, the robot command signal generation unit being configured to generate the robot command signal based on the coordinate information managed by the coordinate information management unit and based on the second numerical control program. Upon setting or switching of the designated coordinate format, the robot control device acquires coordinate values of the control axes in the designated coordinate format after the setting or the switching, and transmits the acquired coordinate values to the numerical control device. The coordinate information management unit updates the coordinate information according to the coordinate values transmitted from the robot control device.

Effects of the Invention

According to the one aspect of the present disclosure, upon setting or switching of the designated coordinate format, the robot control device acquires coordinate values of the control axes in the designated coordinate format after the setting or the switching, and transmits the acquired coordinate values to the numerical control device. The coordinate information management unit of the numerical control device manages the coordinate information including, as components thereof, the coordinate values of the control axes of the designated coordinate format that is designated in accordance with the second numerical control program, and updates the coordinate information according to the coordinate values transmitted from the robot control device. Thus, since the robot control device transmits the coordinate values of the control axes in the designated coordinate format every time the designated coordinate format is set or switched, the numerical control device needs to manage only the coordinate information of the currently designated coordinate format. That is, the numerical control device needs to manage not all the coordinate values of all the control axes of all the coordinate formats that can be designated in the second numerical control program. Therefore, while the second numerical control program enables the position and posture of the robot can be specified in two or more coordinate formats, an increase in the number of control axes to be managed by the numerical control device can be avoided. Further, allowing the numerical control device to manage a small number of control axes makes it possible to prevent an increase in costs for the numerical control device. Thus, a robot control function can be added to an existing numerical control device without difficulty. In addition, allowing the numerical control device to manage a small number of control axes makes it possible to prevent an increase in the computational load of a robot control system of the numerical control device. Thus, deterioration of machining performance of the robot and the machine tool can be prevented as well.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic diagram illustrating a numerical control system according to an embodiment of the present disclosure;

FIG. 2 is a functional block diagram of a numerical control device and a robot control device;

FIG. 3A is a flowchart (part 1) illustrating a procedure of a coordinates-configuration information management process;

FIG. 3B is a flowchart (part 2) illustrating the procedure of the coordinates-configuration information management process;

FIG. 4 illustrates an example of a numerical control program for robot;

FIG. 5A is a sequence diagram (part 1) in a case where a numerical control device is operated in accordance with the numerical control program for robot illustrated in FIG. 4 ; and

FIG. 5B is a sequence diagram (part 2) in the case where the numerical control device is operated in accordance with the numerical control program for robot illustrated in FIG. 4 .

PREFERRED MODE FOR CARRYING OUT THE INVENTION

A numerical control system 1 according to an embodiment of the present disclosure will be described with reference to the drawings.

FIG. 1 is a schematic diagram illustrating the numerical control system 1 according to the present embodiment.

The numerical control system 1 includes a machine tool 2, a numerical control device (CNC) 5 for controlling the machine tool 2, a robot 3 provided in the vicinity of the machine tool 2, and a robot control device 6 communicably connected to the numerical control device 5. The numerical control device 5 generates a machine tool command signal as a command directed to the machine tool 2 and a robot command signal as a command directed to the robot 3 in accordance with predetermined numerical control programs, and transmits the machine tool command signal and the robot command signal to the machine tool 2 and the robot control device 6. The robot control device 6 controls operation of the robot 3 in response to the robot command signal transmitted from the numerical control device 5.

The machine tool 2 machines a workpiece (not shown) in response to the machine tool command signal transmitted from the numerical control device 5. Here, examples of the machine tool 2 include, but are not limited to, a lathe, a drill press, a milling machine, a grinding machine, a laser processing machine, an injection molding machine, etc.

The robot 3 operates under the control of the robot control device 6, and performs a predetermined task with respect to a workpiece machined by the machine tool 2, for example. The robot 3 is, for example, an articulated robot, and has an arm distal end 31 to which a gripping tool 32 for gripping the workpiece is attached. In the following description, a non-limiting example will be described in which the robot 3 grips the workpiece machined by the machine tool 2 at a predetermined position with the gripping tool 32, and conveys the workpiece to a predetermined location. In the following non-limiting example, the robot 3 is a six-axis articulated robot, but the number of axes is not limited thereto.

The numerical control device 5 and the robot control device 6 are each a computer constituted by hardware including: an arithmetic processing means such as a central processing unit (CPU); an auxiliary storage means such as a hard disk drive (HDD) and a solid state drive (SSD) in which various programs are stored; a main storage means such as a random access memory (RAM) in which data temporarily required for the arithmetic processing means to execute the programs is stored; an operation means such as a keyboard with which an operator performs various operations; and a display means such as a display for displaying various kinds of information to the operator. The robot control device 6 and the numerical control device 5 can transmit and receive various signals to and from each other via Ethernet (registered trademark), for example.

FIG. 2 is a functional block diagram of the numerical control device 5 and the robot control device 6.

As illustrated in FIG. 2 , in the numerical control device 5, various functions, such as a machine tool control module 51 as a control system for the machine tool 2, a robot control module 52 as a control system for the robot 3, and a storage unit 53, are implemented by the aforementioned hardware configuration.

The storage unit 53 stores a plurality of numerical control programs created by way of, for example, operations by an operator. More specifically, the storage unit 53 stores, for example, a numerical control program for machine tool, which is a first numerical control program for controlling operation of the machine tool 2, and a numerical control program for robot, which is a second numerical control program for controlling operation of the robot 3. The numerical control program for machine tool and the numerical control program for robot are written in a common programming language (for example, G code).

The numerical control program for machine tool is described based on a machine tool coordinate system, which is a first coordinate system having the origin at a reference point set on the machine tool 2 or in the vicinity of the machine tool 2. Thus, in the numerical control program for machine tool, the position and posture of a control point of the machine tool 2 are described by means of coordinate values in the machine tool coordinate system.

The numerical control program for robot is described based on a robot coordinate system, which is a second coordinate system different from the machine tool coordinate system. Thus, in the numerical control program for robot, the position and posture of a control point of the robot 3 (e.g., the arm distal end 31 of the robot 3) are described by means of coordinate values in the robot coordinate system different from the machine tool coordinate system. The robot coordinate system is a coordinate system having the origin at a reference point set on the robot 3 or in the vicinity of the robot 3. In the following, an example in which the robot coordinate system is different from the machine tool coordinate system will be described, but the present disclosure is not limited thereto. The robot coordinate system may coincide with the machine tool coordinate system. In other words, the origin and the directions of the coordinate axes of the robot coordinate system may coincide with the origin and the directions of the coordinate axes of the machine tool coordinate system.

In the numerical control program for robot, the robot coordinate system is switchable between two or more coordinate formats having different control axes. More specifically, in the numerical control program for robot, the position and posture of a control point of the robot 3 can be specified in a rectangular coordinate format or a joint coordinate format.

In the joint coordinate format, the position and posture of the control point of the robot 3 are specified by means of six coordinate values in total, which are real numbers and have, as components thereof, rotational angle values (J1, J2, J3, J4, J5, J6) of the six joints of the robot 3.

In the rectangular coordinate format, the position and posture of the control point of the robot 3 are specified by means of six coordinate values in total, which are real numbers and have, as components thereof, three coordinate values (X, Y, Z) along the three orthogonal coordinate axes and three rotational angle values (A, B, C) around the respective orthogonal coordinate axes.

Here, in the joint coordinate format, the rotational angles of the joints of the robot 3 are directly specified, and accordingly, the axis arrangement of the arms and wrist of the robot 3 and a rotation number of the joints that can rotate by 360 degrees or more (hereinafter, these are collectively referred to as “configuration of the robot 3”) are uniquely determined. In contrast, in the rectangular coordinate format, since the position and posture of the control point of the robot 3 are specified by means of the six coordinate values (X, Y, Z, A, B, C), the configuration of the robot 3 cannot be uniquely determined. Therefore, in the numerical control program for robot, the configuration of the robot 3 can be specified by means of a configuration value P which is an integer with a predetermined number of digits. Thus, the position and posture of the control point of the robot 3 and the configuration of the robot 3 are represented by the six coordinate values (J1, J2, J3, J4, J5, J6) in the joint coordinate format, and are represented by the six coordinate values and one configuration value (X, Y, Z, A, B, C, P) in the rectangular coordinate format.

In the numerical control program for robot, the coordinate format can be set with the G codes “G68.8” and “G68.9”. More specifically, the coordinate format is set to the joint coordinate format by inputting the G code “G68.8”, whereas the coordinate format is set to the rectangular coordinate format by inputting the G code “G68.9”. The G codes “G68.8” and “G68.9” for setting the coordinate formats are modal codes. Accordingly, once the coordinate format is set to the joint coordinate format or the rectangular coordinate format by the corresponding G code, the set coordinate format is maintained until the coordinate format is switched again by the other G code. In the present embodiment, in a case where the numerical control program for robot does not contain the G codes for setting the coordinate formats, the coordinate format is automatically set to the rectangular coordinate format. However, this is a non-limiting example.

The machine tool control module 51 generates the machine tool command signal as a command directed to the machine tool 2 in accordance with the numerical control program for machine tool, and inputs the machine tool command signal to an actuator (not shown) of the machine tool 2. More specifically, the machine tool control module 51 reads the numerical control program for machine tool stored in the storage unit 53, analyzes a command type that is based on the numerical control program, and thereby generates the machine tool command signal. The machine tool 2 operates in response to the machine tool command signal transmitted from the machine tool control module 51 to thereby machine a workpiece (not shown).

The robot control module 52 generates, in accordance with the numerical control program for robot, the robot command signal as a command directed to the robot 3 and various request signals directed to the robot control device 6, and transmits the signals to the robot control device 6. More specifically, the robot control module 52 includes a program input unit 521, an input analysis unit 522, a coordinates-configuration information control unit 523, a coordinates-configuration information management unit 524, a robot command signal generation unit 525, a memory 526, a coordinate display unit 527, and a data transmission/reception unit 528, and generates the robot command signal and various request signals by means of these units.

The program input unit 521 reads numerical control programs for robot from the storage unit 53, and sequentially inputs the numerical control programs to the input analysis unit 522.

The input analysis unit 522 sequentially analyzes the command types that are based on the numerical value control programs inputted from the program input unit 521 for each block, and transmits the analysis results to the coordinates-configuration information control unit 523 and the robot command signal generation unit 525.

Based on the analysis result inputted from the input analysis unit 522, the coordinates-configuration information control unit 523 identifies a designated coordinate format that is a coordinate format set in accordance with the numerical control program for robot. As described above, in the numerical control program for robot, the coordinate format can be set or switched to the joint coordinate format or the rectangular coordinate format by means of the predetermined G codes. The coordinates-configuration information control unit 523 identifies the designated coordinate format based on the analysis result inputted from the input analysis unit 522, and transmits information regarding the currently designated coordinate format to the coordinates-configuration information management unit 524 and the robot command signal generation unit 525.

Further, the coordinates-configuration information control unit 523 writes a reference coordinate value request signal and a reference configuration value request signal to the data transmission/reception unit 528 at a predetermined timing during execution of the numerical control program for robot. The reference coordinate value request signal is for newly acquiring, from the robot control device 6, reference coordinate values corresponding to current coordinate values of the control axes in the designated coordinate format, which has been identified. The reference configuration value request signal is for newly acquiring a reference configuration value corresponding to a current configuration value of the robot 3 from the robot control device 6. The reference coordinate value request signal and the reference configuration value request signal are then transmitted to the robot control device 6. The timing at which the reference coordinate value request signal and the reference configuration value request signal are transmitted to the robot control device 6 will be described in detail later.

The coordinates-configuration information management unit 524 manages, in the memory 526, coordinate information including as components the coordinate values of the control axes of the designated coordinate format, which has been identified by the coordinates-configuration information control unit 523, and configuration information including as component the configuration value of the robot 3. As illustrated in FIG. 2 , the memory 526 includes a coordinate information storage area 526 a for storing coordinate values as a plurality of components and a configuration information storage area 526 b for storing the configuration value. The memory 526 stores a plurality of sets of coordinate values in the coordinate information storage area 526 a, and one set of configuration values in the configuration information storage area 526 b, for example. The number of the sets of coordinate values that can be stored in the coordinate information storage area 526 a, i.e., the number of components of the coordinate information that is managed by the coordinates-configuration information management unit 524 and the memory 526, is preferably smaller than the sum of six that is the number of control axes in the rectangular coordinate format and six that is the number of control axes in the joint coordinate format. Hereinafter, a case where the number of the sets of coordinate values that can be stored in the coordinate information storage area 526 a is six, which is the number of the control axes in the rectangular coordinate format and the number of the control axes in the joint coordinate format will be described, but the present disclosure is not limited to such a case.

In a case where the designated coordinate format is the joint coordinate format, the coordinates-configuration information management unit 524 acquires the coordinate values (J1, J2, J3, J4, J5, J6) of the control axes of the robot 3 in the joint coordinate format, in accordance with a procedure to be described later with reference to FIGS. 3A and 3B, and stores these coordinate values in a first component *1, a second component *2, a third component *3, a fourth component *4, a fifth component *5, and a sixth component *6 of the coordinate information storage area 526 a.

In a case where the designated coordinate format is the rectangular coordinate format, the coordinates-configuration information management unit 524 acquires the coordinate values (X, Y, Z, A, B, C) of the control axes of the robot 3 in the rectangular coordinate format, in accordance with the procedure to be described later with reference to FIGS. 3A and 3B, and stores these coordinate values in the first to sixth components *1 to *6 of the coordinate information storage area 526 a. In the case where the designated coordinate format is the rectangular coordinate format, the coordinates-configuration information management unit 524 acquires the configuration value P of the robot 3 in accordance with the procedure to be described later with reference to FIGS. 3A and 3B, and stores the configuration value P in the configuration information storage area 526 b.

FIGS. 3A and 3B are flowcharts showing the procedure of a process of managing the coordinate information and the configuration information in the designated coordinate format (hereinafter referred to as “coordinates-configuration information management process”), which is performed by the coordinates-configuration information management unit 524 and the memory 526. The coordinates-configuration information management process shown in FIGS. 3A and 3B is repeatedly performed in predetermined cycles by the coordinates-configuration information management unit 524 during execution of the numerical control program for robot by the robot control module 52.

First, in Step S1, the coordinates-configuration information management unit 524 determines whether or not the designated coordinate format is the joint coordinate format. If the determination result in Step S1 is YES, the coordinates-configuration information management unit 524 proceeds to Step S2, whereas if the determination result in Step S1 is NO, the coordinates-configuration information management unit 524 proceeds to Step S4.

In Step S2, the coordinates-configuration information management unit 524 determines whether or not it is immediately after reception of reference coordinate value information including latest reference coordinate values from the robot control device 6. As described above, the reference coordinate values are the current coordinate values of the control axes in the designated coordinate format. As will be described later, the robot control device 6 acquires the reference coordinate values in response to a reference coordinate value request signal that is transmitted at a predetermined timing from the coordinates-configuration information control unit 523, and sends back reference coordinate value information including the reference coordinate values to the numerical control device 5. If the determination result in Step S2 is YES, the coordinates-configuration information management unit 524 proceeds to Step S3, whereas if the determination result in Step S2 is NO, the coordinates-configuration information management unit 524 ends the process shown in FIGS. 3A and 3B.

In Step S3, the coordinates-configuration information management unit 524 updates the coordinate information stored in the coordinate information storage area 526 a of the memory 526 according to the reference coordinate values transmitted from the robot control device 6, and then, ends the process shown in FIGS. 3A and 3B. More specifically, the coordinates-configuration information management unit 524 replaces the coordinate values stored in the components *1 to *6 of the coordinate information storage area 526 a with the reference coordinate values transmitted from the robot control device 6.

In Step S4, the coordinates-configuration information management unit 524 determines whether or not it is immediately after reception of reference coordinate value information including latest reference coordinate values from the robot control device 6. If the determination result in Step S4 is YES, the coordinates-configuration information management unit 524 proceeds to Step S5, whereas if the determination result in Step S4 is NO, the coordinates-configuration information management unit 524 proceeds to Step S6.

In Step S5, the coordinates-configuration information management unit 524 updates the coordinate information stored in the coordinate information storage area 526 a of the memory 526 according to the reference coordinate values transmitted from the robot control device 6 in accordance with the same procedure as in Step S3 described above, and then, proceeds to Step S6.

In Step S6, the coordinates-configuration information management unit 524 determines whether or not reference configuration value information including a latest reference configuration value has been received from the robot control device 6. As described above, the reference configuration value is the current configuration value of the robot 3. As will be described later, the robot control device 6 acquires the reference configuration value in response to a reference configuration value request signal that is transmitted at a predetermined timing from the coordinates-configuration information control unit 523, and sends back reference configuration value information including the reference configuration value to the numerical control device 5. If the determination result in Step S6 is YES, the coordinates-configuration information management unit 524 proceeds to Step S7, whereas if the determination result in Step S6 is NO, the coordinates-configuration information management unit 524 proceeds to Step S8.

In Step S7, the coordinates-configuration information management unit 524 updates the configuration information stored in the configuration information storage area 526 b of the memory 526 according to the reference configuration value transmitted from the robot control device 6, and then, ends the process shown in FIGS. 3A and 3B. More specifically, the coordinates-configuration information management unit 524 replaces the configuration value stored in the configuration information storage area 526 b of the memory 526 with the reference configuration value transmitted from the robot control device 6.

In Step S8, the coordinates-configuration information management unit 524 updates the configuration information stored in the configuration information storage area 526 b of the memory 526 according to the configuration value specified in the numerical control program and inputted from the input analysis unit 522, and then, ends the process shown in FIGS. 3A and 3B.

As described above, the coordinates-configuration information management unit 524 updates the coordinate information stored in the coordinate information storage area 526 a of the memory 526 to the reference coordinate values, at the timing of receiving the reference coordinate values transmitted from the robot control device 6.

In the case where the designated coordinate format is the rectangular coordinate format, the coordinates-configuration information management unit 524 updates the configuration information stored in the configuration information storage area 526 b of the memory 526 according to the reference configuration value transmitted from the robot control device 6 or the configuration value specified in the numerical control program. More specifically, in the case of receiving the reference configuration value transmitted from the robot control device 6, the coordinates-configuration information management unit 524 updates the configuration information stored in the configuration information storage area 526 b according to the reference configuration value, and otherwise, updates the configuration information stored in the configuration information storage area 526 b according to the configuration value specified in the numerical control program.

Referring back to FIG. 2 , the coordinate display unit 527 reads the coordinate information stored in the coordinate information storage area 526 a of the memory 526 in predetermined cycles during execution of the numerical control program for robot, and displays the coordinate information together with the designated coordinate format on a display (not shown). This allows the operator to check the position and posture of the robot 3 with reference to the numerical values.

Based on the latest coordinate information and the latest configuration information stored in the memory 526 and the analysis result of the numerical control program inputted from the input analysis unit 522, the robot command signal generation unit 525 generates a robot command signal in accordance with the numerical control program, writes the generated robot command signal to the data transmission/reception unit 528, and transmits the robot command signal to the robot control device 6.

Here, a case will be described in which the command type based on the numerical control program causes a change in the position and posture of the control point of the robot 3 or a change in the configuration of the robot 3 (specifically, a case where the G code is “G00” corresponding to positioning (fast feeding) or “G01” corresponding to linear interpolation, etc.). In this case, the robot command signal generation unit 525 calculates, in the designated coordinate format, an end point and a speed of the control point of the robot 3 while setting the coordinate values stored in the coordinate information storage area 526 a of the memory 526 as the starting point for the control point of the robot 3, and writes a robot command signal including the information regarding the designated coordinate format, the end point, and the speed to the data transmission/reception unit 528. After calculating the coordinate values of the end point of the control point of the robot 3 in the above-described manner, the robot command signal generation unit 525 updates the starting point coordinate values stored in the coordinate information storage area 526 a of the memory 526 according to the calculated end point coordinate values.

As described earlier, the configuration of the robot 3 cannot be determined uniquely in the rectangular coordinate format. Therefore, when the designated coordinate format is the rectangular coordinate format, the robot command signal generation unit 525 regards the coordinate values stored in the coordinate information storage area 526 a of the memory 526 as the starting point for the control point of the robot 3, calculates an end point and a speed for the control point of the robot 3 and a configuration value at the end point, and writes a robot command signal including the information regarding the designated coordinate format, the end point, the speed, and the configuration value at the end point to the data transmission/reception unit 528. After calculating the coordinate values of the end point of the control point of the robot 3 in the above-described manner, the robot command signal generation unit 525 updates the starting point coordinate values stored in the coordinate information storage area 526 a of the memory 526 according to the calculated end point coordinate values.

Next, the timing at which the coordinates-configuration information control unit 523 generates the reference coordinate value request signal and the reference configuration value request signal and transmits these request signals to the robot control device 6 will be described. As described above, the reference coordinate value request signal and the reference configuration value request signal function as a trigger for updating the coordinate information and the configuration information stored in the memory 526 according to the information transmitted from the robot control device 6. Accordingly, the coordinates-configuration information control unit 523 determines whether or not it is necessary to acquire the reference coordinate values or the reference configuration value during execution of the numerical control program for robot by the robot control module 52, and transmits the reference coordinate value request signal to the robot control device 6 upon determining that acquisition of the reference coordinate values is necessary, and transmits the reference configuration value request signal to the robot control device 6 upon determining that acquisition of reference configuration value is necessary.

More specifically, the coordinates-configuration information control unit 523 determines it necessary to acquire the reference coordinate values in the following cases: when the execution of the numerical control program for robot is started, when the numerical control program for robot interrupted for some reason is restarted, when the designated coordinate format is newly set in accordance with the numerical control program for robot, and when the designated coordinate format is switched in accordance with the numerical control program for robot. In these cases, the coordinates-configuration information control unit 523 writes the reference coordinate value request signal to the data transmission/reception unit 528. In response, the reference coordinate value request signal is transmitted from the data transmission/reception unit 528 to the robot control device 6.

The coordinates-configuration information control unit 523 determines it necessary to acquire the reference configuration value at least in the case where the designated coordinate format is the rectangular coordinate format, and writes the reference configuration value request signal to the data transmission/reception unit 528. In response, the reference configuration value request signal is transmitted from the data transmission/reception unit 528 to the robot control device 6. More specifically, in a case where the execution of the numerical control program for robot is started while the designated coordinate format is set to the rectangular coordinate format and in a case where the designated coordinate format is the rectangular coordinate format and a configuration value is not specified in the numerical control program, the coordinates-configuration information control unit 523 determines it necessary to acquire the reference configuration value, and transmits the reference configuration value request signal to the robot control device 6. In a case where the designated coordinate format is the rectangular coordinate format and a configuration value is specified in the numerical control program, the coordinates-configuration information control unit 523 determines it unnecessary to acquire the reference configuration value, and does not transmit the reference configuration value request signal to the robot control device 6. In other words, in the case where a configuration value is specified in the numerical control program, the coordinates-configuration information control unit 523 generates a robot command signal while giving priority to the configuration value specified in the numerical control program over a reference configuration value that is acquired in the robot control device 6.

In response to the robot command signal generation unit 525 writing a robot command signal, the data transmission/reception unit 528 transmits the robot command signal to the data transmission/reception unit 61 of the robot control device 6. In response to the coordinates-configuration information control unit 523 writing a reference coordinate value request signal or a reference configuration value request signal, the data transmission/reception unit 528 transmits the reference coordinate value request signal or the reference configuration value request signal to the data transmission/reception unit 61 of the robot control device 6.

Upon receiving reference coordinate value information or reference configuration value information transmitted from the data transmission/reception unit 61 of the robot control device 6, the data transmission/reception unit 528 transmits the reference coordinate value information or the reference configuration value information to the coordinates-configuration information management unit 524.

As shown in FIG. 2 , the robot control device 6 is provided with various functions such as the data transmission/reception unit 61, an input analysis unit 62, a robot position control unit 63, a servo control unit 64, and a robot position management unit 65 that are implemented by the hardware configuration described above.

Upon receiving the robot command signal, the reference coordinate value request signal, and the reference configuration value request signal transmitted from the data transmission/reception unit 528 of the numerical control device 5, the data transmission/reception unit 61 transmits these signals to the input analysis unit 62.

In response to the robot position management unit 65 writing reference coordinate value information or reference configuration value information, the data transmission/reception unit 61 transmits the reference coordinate value information or the reference configuration value information to the data transmission/reception unit 528 of the numerical control device 5.

Upon receiving the robot command signal transmitted from the data transmission/reception unit 61, the input analysis unit 62 performs conversion into a robot program for controlling the robot 3 based on the robot command signal, and transmits the robot program to the robot position control unit 63. Upon receiving the reference coordinate value request signal or the reference configuration value request signal transmitted from the data transmission/reception unit 61, the input analysis unit 62 transmits the request signal to the robot position management unit 65.

The robot position control unit 63 performs kinematic transformation in accordance with the robot program transmitted from the input analysis unit 62 to thereby generate commands directed to a plurality of servo motors (not shown) that rotate the joints of the robot 3, and inputs the commands to the servo control unit 64.

The servo control unit 64 performs feedback control on the servo motors of the robot 3 so as to implement the commands inputted from the robot position control unit 63.

Upon receiving the reference coordinate value request signal transmitted from the input analysis unit 62, the robot position management unit 65 acquires detection values from various position sensors (not shown) provided to the robot 3, and calculates the coordinate values of the control axes of the robot coordinate system in the designated coordinate format, based on the detection values. The robot position management unit 65 sets the calculated coordinate values as reference coordinate values, and writes reference coordinate value information including the reference coordinate values to the data transmission/reception unit 61. In response, the data transmission/reception unit 61 transmits the reference coordinate value information to the numerical control device 5.

Upon receiving the reference configuration value request signal transmitted from the input analysis unit 62, the robot position management unit 65 acquires detection values from the various position sensors provided to the robot 3, and calculates a configuration value of the robot 3 based on the detection values. The robot position management unit 65 sets the calculated configuration value as a reference configuration value, and writes reference configuration value information including the reference configuration value to the data transmission/reception unit 61. In response, the data transmission/reception unit 61 transmits the reference configuration value information to the numerical control device 5.

Next, a flow of the various signals and information in the numerical control system 1 having the above-described configuration will be described with reference to FIGS. 4, 5A, and 5B.

FIG. 4 illustrates an example of a numerical control program for robot. FIGS. 5A and 5B are sequence diagrams showing the flow of signals and information between the numerical control device 5 and the robot control device 6 in a case where the numerical control device 5 is operated in accordance with the numerical control program for robot illustrated in FIG. 4 .

First, in a block denoted by the sequence number “N10”, a command “G68.8” is inputted to the coordinates-configuration information control unit 523 of the numerical control device 5. In response to this, the coordinates-configuration information control unit 523 sets the joint coordinate format as the designated coordinate format. Further, in response to setting of the designated coordinate format for the first time in this block, the coordinates-configuration information control unit 523 transmits a reference coordinate value request signal to the robot position management unit 65 of the robot control device 6. In response to reception of the reference coordinate value request signal, the robot position management unit 65 of the robot control device 6 acquires reference coordinate values (J1, J2, J3, J4, J5, J6) in the currently designated coordinate format, and transmits reference coordinate value information including these reference coordinate values to the coordinates-configuration information management unit 524 of the numerical control device 5. The coordinates-configuration information management unit 524 of the numerical control device 5 updates coordinate information stored in the coordinate information storage area 526 a of the memory 526 according to the received reference coordinate values.

Next, in a block denoted by the sequence number “N11”, a command “G00 J1=_J2=_J3=_J4=_J5=_J6=_” that is based on the joint coordinate format is inputted to the robot command signal generation unit 525 of the numerical control device 5. Note that a coordinate value of an end point is inputted to the spaces with the underbars in the command. The robot command signal generation unit 525 generates a robot command signal based on the coordinate information stored in the coordinate information storage area 526 a of the memory 526 and the inputted command, and transmits the robot command signal to the robot control device 6. The robot control device 6 controls the operation of the robot 3 based on the received robot command signal. Subsequent to this, the robot command signal generation unit 525 of the numerical control device 5 updates, according to the numerical control program, the coordinate information stored in the coordinate information storage area 526 a on the basis of the reference coordinate values acquired in the block of the sequence number “N10”, until the designated coordinate format is switched in a block of the sequence number “N20”.

Next, in the block denoted by the sequence number “N20”, a command “G68.9” is inputted to the coordinates-configuration information control unit 523 of the numerical control device 5. In response to this, the coordinates-configuration information control unit 523 switches the designated coordinate format from the joint coordinate format, which is currently designated, to the rectangular coordinate format. Further, in response to the switching of the designated coordinate formats in this block, the coordinates-configuration information control unit 523 transmits a reference coordinate value request signal to the robot position management unit 65 of the robot control device 6. In response to reception of the reference coordinate value request signal, the robot position management unit 65 of the robot control device 6 acquires reference coordinate values (X, Y, Z, A, B, C) in the currently-designated coordinate format, and transmits reference coordinate value information including these reference coordinate values to the coordinates-configuration information management unit 524 of the numerical control device 5. The coordinates-configuration information management unit 524 of the numerical control device 5 updates the coordinate information stored in the coordinate information storage area 526 a of the memory 526 according to the received reference coordinate values.

Next, in a block denoted by the sequence number “N21”, a command “G01 X_Y_Z_A_B_C_” based on the rectangular coordinate format is inputted to the coordinates-configuration information control unit 523 and the robot command signal generation unit 525 of the numerical control device 5. Note that the command inputted in this block does not specify any configuration value of the robot 3. In the case where the designated coordinate format is the rectangular coordinate format and the command inputted in this block does not specify any configuration value, the coordinates-configuration information control unit 523 determines that it is necessary to acquire a reference configuration value, and transmits a reference configuration value request signal to the robot position management unit 65 of the robot control device 6. In response to reception of the reference configuration value request signal, the robot position management unit 65 acquires a current configuration value (P) of the robot 3, and transmits reference configuration value information including this reference configuration value to the coordinates-configuration information management unit 524 of the numerical control device 5. The coordinates-configuration information management unit 524 updates the configuration information stored in the configuration information storage area 526 b of the memory 526 according to the received reference configuration value.

Following the updating of the configuration information in the described-above manner, the robot command signal generation unit 525 of the numerical control device 5 generates a robot command signal based on the coordinate information stored in the coordinate information storage area 526 a of the memory 526, the configuration information stored in the configuration information storage area 526 b of the memory 526, and the inputted command, and transmits the robot command signal to the robot control device 6. The robot control device 6 controls the operation of the robot 3 based on the received robot command signal. Subsequent to this, the robot command signal generation unit 525 of the numerical control device 5 updates, according to the numerical control program, the coordinate information stored in the coordinate information storage area 526 a on the basis of the reference coordinate values acquired in the block of the sequence number “N20”, until the designated coordinate format is switched in a block of the sequence number “N40”.

Next, in a block denoted by the sequence number “N30”, a command “G01 X_Y_Z_A_B_C_P_” based on the rectangular coordinate format is inputted to the coordinates-configuration information control unit 523 and the robot command signal generation unit 525 of the numerical control device 5. Note that a configuration value of the robot 3 is specified in the command inputted in this block. In the case where a configuration value is specified in the command, the coordinates-configuration information control unit 523 does not transmit a reference configuration value request signal, unlike the process in the block denoted by the sequence number “N21”. In this case, the coordinates-configuration information management unit 524 of the numerical control device 5 updates the configuration information stored in the configuration information storage area 526 b according to the configuration value specified in the inputted command.

Following the updating of the configuration information in the described-above manner, the robot command signal generation unit 525 of the numerical control device 5 generates a robot command signal based on the coordinate information stored in the coordinate information storage area 526 a of the memory 526, the configuration information stored in the configuration information storage area 526 b of the memory 526, and the inputted command, and transmits the robot command signal to the robot control device 6. The robot control device 6 controls the operation of the robot 3 based on the received robot command signal.

Next, in the block denoted by the sequence number “N40”, a command “G68.8” is inputted to the coordinates-configuration information control unit 523 of the numerical control device 5. In response to this, the coordinates-configuration information control unit 523 switches the designated coordinate format from the rectangular coordinate format, which is currently designated, to the joint coordinate format. Further, in response to the switching of the designated coordinate formats in this block, the coordinates-configuration information control unit 523 transmits a reference coordinate value request signal to the robot position management unit 65 of the robot control device 6. In response to reception of the reference coordinate value request signal, the robot position management unit 65 acquires reference coordinate values (J1, J2, J3, J4, J5, J6) in the currently designated coordinate format, and transmits reference coordinate value information including these reference coordinate values to the coordinates-configuration information management unit 524 of the numerical control device 5. The coordinates-configuration information management unit 524 updates the coordinate information stored in the coordinate information storage area 526 a of the memory 526 according to the received reference coordinate values.

Next, in a block denoted by the sequence number “N41”, a command “G01 J1=_J2=_J3=_J4=_J5=_J6=” based on the joint coordinate format is inputted to the robot command signal generation unit 525 of the numerical control device 5. The robot command signal generation unit 525 generates a robot command signal based on the coordinate information stored in the coordinate information storage area 526 a of the memory 526 and the inputted command, and transmits the robot command signal to the robot control device 6. The robot control device 6 controls the operation of the robot 3 based on the received robot command signal. Subsequent to this, the robot command signal generation unit 525 of the numerical control device 5 updates, according to the numerical control program, the coordinate information stored in the coordinate information storage area 526 a on the basis of the reference coordinate values acquired in the block of the sequence number “N40”, until the designated coordinate format is switched.

The present embodiment provides the following effects. Upon setting or switching of the designated coordinate format, the robot position management unit 65 of the robot control device 6 acquires reference coordinate values of the control axes in the designated coordinate format after the setting or the switching, and transmits the acquired reference coordinate values to the numerical control device 5. The coordinates-configuration information management unit 524 of the numerical control device 5 manages, in the coordinate information storage area 526 a of the memory 526, the coordinate information including, as components thereof, coordinate values of the control axes in the designated coordinate format, and updates the coordinate information stored in the coordinate information storage area 526 a according to the reference coordinate values transmitted from the robot control device 6. Thus, since the robot control device 6 transmits the reference coordinate values of the control axes in the designated coordinate format every time the designated coordinate format is set or switched, the numerical control device 5 needs to manage only the coordinate information in the currently designated coordinate format in the memory 526. That is, the numerical control device 5 needs to manage, in the memory 526, not all the coordinate values of all the control axes of all the coordinate formats that can be designated in the numerical control program for robot. Therefore, while the numerical control program for robot enables the position and posture of the robot 3 to be specified in two or more coordinate formats, an increase in the number of control axes to be managed by the coordinates-configuration information management unit 524 and the memory 526 can be avoided. Further, allowing the coordinates-configuration information management unit 524 and the memory 526 to manage a small number of control axes makes it possible to prevent an increase in costs for the numerical control device 5. Thus, the robot control module 52 can be added to an existing numerical control device 5 without difficulty. In addition, allowing the coordinates-configuration information management unit 524 and the memory 526 to manage a small number of control axes makes it possible to prevent an increase in the computational load of the robot control module 52 of the numerical control device 5. Thus, deterioration of machining performance of the robot 3 and the machine tool 2 can be prevented as well.

In the numerical control program for robot according to the present embodiment, the position and posture of the robot 3 can be specified in the rectangular coordinate format or the joint coordinate format. This feature allows the operator to freely create a numerical control program for robot in a familiar coordinate format.

In the present embodiment, the number of components of the coordinate information that is managed in the coordinate information storage area 526 a of the memory 526 is six, and this number of components is smaller than the sum of the number (six) of control axes in the rectangular coordinate format and the number (six) of control axes in the joint coordinate format. This feature enables minimization of the size of the coordinate information storage area 526 a of the memory 526, thereby making it possible to prevent an increase in costs for the numerical control device 5. Thus, the robot control module 52 can be added to an existing numerical control device 5 without difficulty. Further, the minimization of the size of the coordinate information storage area 526 a makes it possible to prevent an increase in the computational load of the robot control module 52 of the numerical control device 5. Thus, deterioration of the machining performance of the robot 3 and the machine tool 2 can be prevented.

The present disclosure is not limited to the above embodiment, and various changes and modifications can be made to the present disclosure.

EXPLANATION OF REFERENCE NUMERALS

-   -   1: Numerical Control System     -   2: Machine Tool     -   3: Robot     -   5: Numerical Control Device     -   51: Machine Tool Control Module     -   52: Robot Control Module     -   521: Program Input Unit     -   522: Input Analysis Unit     -   523: Coordinates-Configuration Information Control Unit     -   524: Coordinates-Configuration Information Management Unit     -   525: Robot Command Signal Generation Unit     -   526: Memory     -   526 a: Coordinate Information Storage Area     -   526 b: Configuration Information Storage Area     -   527: Coordinate Display Unit     -   528: Data Transmission/Reception Unit     -   53: Storage Unit     -   6: Robot Control Device     -   61: Data Transmission/Reception Unit     -   62: Input Analysis Unit     -   63: Robot Position Control Unit     -   64: Servo Control Unit     -   65: Robot Position Management Unit 

1. A numerical control system comprising: a numerical control device configured to generate a machine tool command signal as a command directed to a machine tool in accordance with a first numerical control program, and a robot command signal as a command directed to a robot in accordance with a second numerical control program; and a robot control device communicable with the numerical control device and configured to control operation of the robot based on the robot command signal, wherein in the second numerical control program, a position and a posture of the robot is able to be specified in two or more coordinate formats having different control axes, the numerical control device includes a coordinate information management unit and a robot command signal generation unit, the coordinate information management unit being configured to manage coordinate information including, as components, coordinate values of control axes of a designated coordinate format that is designated in accordance with the second numerical control program, the robot command signal generation unit being configured to generate the robot command signal based on the coordinate information managed by the coordinate information management unit and based on the second numerical control program, upon setting or switching of the designated coordinate format, the robot control device acquires coordinate values of the control axes in the designated coordinate format after the setting or the switching, and transmits the acquired coordinate values to the numerical control device, and the coordinate information management unit updates the coordinate information according to the coordinate values transmitted from the robot control device.
 2. The numerical control system according to claim 1, wherein in the second numerical control program, the position and the posture of the robot is able to be specified in a rectangular coordinate format or a joint coordinate format.
 3. The numerical control system according to claim 2, wherein a number of the components of the coordinate information is smaller than a sum of a number of control axes in the rectangular coordinate format and a number of control axes in the joint coordinate format. 